package com.lht.syt.user.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author lht
 * @version 1.0
 * @description: TODO
 * @date 2024/11/8 15:45
 */

@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${wx.open.app_id}")
    private String app_id;
    @Value("${wx.open.app_secret}")
    private String app_secret;
    @Value("${wx.open.redirect_url}")
    private String redirect_url;
    @Value("${syt.baseUrl}")
    private String syt_baseUrl;

    public static String WX_OPEN_APP_ID;
    public static String WX_OPEN_APP_SECRET;
    public static String WX_OPEN_REDIRECT_URL;

    public static String SYT_BASE_URL;

    @Override
    public void afterPropertiesSet() throws Exception {
        WX_OPEN_APP_ID = app_id;
        WX_OPEN_APP_SECRET = app_secret;
        WX_OPEN_REDIRECT_URL = redirect_url;
        SYT_BASE_URL = syt_baseUrl;
    }
}
